unit UnitAuditoria;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, dxExEdtr, dxCntner, dxEditor, dxEdLib, dxTL, dxDBCtrl, dxDBGrid,
  StdCtrls, Buttons, ExtCtrls, dxDBTLCl, dxGrClms, DB, ADODB;

type
  TFormAuditoria = class(TForm)
    Panel1: TPanel;
    Label1: TLabel;
    Label2: TLabel;
    ComboBox1: TComboBox;
    Label3: TLabel;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    dxDBGrid1: TdxDBGrid;
    dxDateEdit1: TdxDateEdit;
    dxDateEdit2: TdxDateEdit;
    dsAuditoria: TDataSource;
    qryAuditoria: TADOQuery;
    qryAuditoriaLOG_MOMENTO: TDateTimeField;
    qryAuditoriaUSUARIO_LOGIN: TStringField;
    qryAuditoriaJLOG_ESTACAO: TStringField;
    qryAuditoriaMENU_CODIGO: TSmallintField;
    qryAuditoriaMENU_TITULO: TStringField;
    dxDBGrid1LOG_MOMENTO: TdxDBGridDateColumn;
    dxDBGrid1USUARIO_LOGIN: TdxDBGridMaskColumn;
    dxDBGrid1LOG_ACAO: TdxDBGridMemoColumn;
    dxDBGrid1JLOG_ESTACAO: TdxDBGridMaskColumn;
    dxDBGrid1MENU_CODIGO: TdxDBGridMaskColumn;
    dxDBGrid1MENU_TITULO: TdxDBGridMaskColumn;
    qryAuditoriaLOG_ACAO: TMemoField;
    procedure BitBtn1Click(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure BitBtn2Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormAuditoria: TFormAuditoria;

implementation

uses UnitPrincipal;

{$R *.dfm}

procedure TFormAuditoria.BitBtn1Click(Sender: TObject);
begin
  FormPrincipal.Acao('Clicou em Ok ',Tag);
  qryAuditoria.Open;
end;

procedure TFormAuditoria.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  Action := caFree;
  Formauditoria := nil;
  FormPrincipal.Acao('Saiu da tela '+Caption,Tag);
end;

procedure TFormAuditoria.BitBtn2Click(Sender: TObject);
begin
  FormPrincipal.Acao('Exportou resultado ',Tag);
  dxDbGrid1.SaveToHTML('Teste.html',True);
end;

procedure TFormAuditoria.FormShow(Sender: TObject);
begin
  FormPrincipal.Acao('Entrou na tela '+Caption,Tag);
end;

end.
